-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[added] onActiveStateChange, onCancelledTransition, onTransitionError Routes props #152
Conversation
Just FYI, here is the karma output for the failing specs:
|
Cool, I'll take a look when I get a spare cycle or two. Thanks for the tests, we need to start taking tests more seriously and I think the harness falls on my shoulders, I'll try to make it friendlier. After the next release we need to beef up our tests too. Does |
|
I got this passing ... its really strange, I need to spend some time making our test stuff 1000% better. |
👎 auth flow example is broken, click on the dashboard before being logged in. |
@rpflorence thanks. i'll take a look. |
👎 also the transitions example is broken, click on "form" then click on "dashboard" then click "cancel" in the alert. BOOM |
@rpflorence did you have any commits to add? or it just passes on your machine? |
I amended and force pushed the changes to the branch |
…outes props Also, removed Routes.handleAsyncError and Routes.handleCancelledTransition
Also, removed Routes.handleAsyncError and Routes.handleCancelledTransition.
This PR exposes these handlers as props so they can be overridden by users. The
onTransitionError
prop is especially useful since it permits users to attach their own error handlers instead of using the default error handler that justthrow
s (see #151).I've written tests for these new features that all pass when I run them alone. However, when I run
npm test
locally there are 3 failing tests, but I'm not convinced that any of them have to do with my changes. I've digged around quite a bit but can't figure out what's going on in the DOM while the tests are running.@rpflorence Since you're more experienced with karma than I am (and writing DOM tests in general) I thought you might be able to take a look?